<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<div class="col-sm-12">
							<h4>发布文章</h4>
						</div>
						<form class="form-horizontal m-t" id="signupForm">
							<input id="cid" name="cid" type="hidden" th:value="${bContent.cid}">
							<div class="form-group">
								<label class="col-sm-1 control-label">标题：</label>
								<div class="col-sm-4">
									<input id="title" name="title" class="form-control" type="text" th:value="${bContent.title}">
								</div>
								<label class="col-sm-1 control-label">作者：</label>
								<div class="col-sm-4">
									<input id="author" name="author" class="form-control" type="text" th:value="${bContent.author}">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-1 control-label">类型：</label>
								<div class="col-sm-4">
									<select id="type" name="type" class="form-control">
										<option value="0" th:selected="${bContent.type == 0}">普通文章</option>
										<option value="1" th:selected="${bContent.type == 1}">推荐文章</option>
									</select>
								</div>
								<label class="col-sm-1 control-label">标签：</label>
								<div class="col-sm-4">
									<input id="tags" name="tags" class="form-control" type="text" th:value="${bContent.tags}">
								</div>
								<input id="tag-btn" class="btn btn-warning" type="button" value="选择标签">
							</div>
							<div class="form-group">
								<label class="col-sm-1 control-label">图片：</label>
								<div class="col-sm-4">
									<button type="button" class="layui-btn" id="test1">
										<i class="fa fa-cloud"></i>上传图片
									</button>
								</div>
								<label class="col-sm-1 control-label">url：</label>
								<div class="col-sm-6">
									<input id="images" name="images" class="form-control" readonly type="text" th:value="${bContent.images}">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-1 control-label">描述：</label>
								<div class="col-sm-11">
									<textarea id="description" name="description" class="form-control" type="text" th:text="${bContent.description}"></textarea>
								</div>
							</div>
							<div class="form-group">
								<input id="content" name="content" type="hidden"
									th:value="${bContent.content}"> <label
									class="col-sm-1 control-label">内容：</label>
								<div class="col-sm-11">
									<div class="ibox-content no-padding">
										<div id="content_sn" class="summernote"></div>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-1 control-label">分类：</label>
								<div class="col-sm-4">
									<input id="categoriesId" name="categories" class="hidden" th:value="${category.menuId}">
									<input id="cName" name="cName" class="form-control" type="text" style="cursor: pointer;" onclick="openDept()"
										readonly="readonly" placeholder="文章分类" th:value="${category.name}">
								</div>
							</div>
<!--							<div class="form-group">-->
<!--								<label class="col-sm-2 control-label">开启评论：</label>-->
<!--								<div class="switch onoffswitch col-sm-1">-->
<!--									<div class="onoffswitch">-->
<!--										<input id="allowComment" name="allowComment" checked=""-->
<!--											type="checkbox" value="1" class="onoffswitch-checkbox"-->
<!--											th:checked=${bContent.allowComment==1}> <label-->
<!--											class="onoffswitch-label" for="allowComment"> <span-->
<!--											class="onoffswitch-inner"></span> <span-->
<!--											class="onoffswitch-switch"></span>-->
<!--										</label>-->
<!--									</div>-->
<!--								</div>-->

<!--								<label class="col-sm-2 control-label">允许订阅：</label>-->
<!--								<div class="switch onoffswitch col-sm-2">-->
<!--									<div class="onoffswitch">-->
<!--										<input id="allowFeed" name="allowFeed" type="checkbox"-->
<!--											checked="" value="1" class="onoffswitch-checkbox"-->
<!--											th:checked=${bContent.allowFeed==1}> <label-->
<!--											class="onoffswitch-label" for="allowFeed"> <span-->
<!--											class="onoffswitch-inner"></span> <span-->
<!--											class="onoffswitch-switch"></span>-->
<!--										</label>-->
<!--									</div>-->
<!--								</div>-->
<!--								<input id="status" name="status" type="hidden">-->
<!--							</div>-->
							<div class="text-right form-group">
								<a class="btn btn-default waves-effect waves-light"
									onclick="returnList()">返回列表</a>
								<button type="button"
									class="btn btn-primary waves-effect waves-light"
									onclick="save(1)">保存文章</button>
<!--								<button type="button"-->
<!--									class="btn btn-warning waves-effect waves-light"-->
<!--									onclick="save(0)">存为草稿</button>-->
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
	<link href="/css/layui.css" rel="stylesheet">
	<script src="/js/bootstrap.min.js?v=3.3.6"></script>
	<script src="/js/content.js?v=1.0.0"></script>
	<script src="/js/layui.js"></script>
	<script type="text/javascript" src="/js/appjs/blog/bContent/edit.js"></script>
</body>
</html>
